package com.dcrzl.shcz.common.excel;

import com.alibaba.excel.converters.date.DateDateConverter;
import com.alibaba.excel.converters.integer.IntegerStringConverter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.alibaba.excel.util.NumberUtils;
import com.alibaba.excel.util.WorkBookUtil;
import com.dcrzl.shcz.common.utils.SysConstant;

import java.util.Date;
import java.util.Objects;

public class MyOrderStatusConverter extends IntegerStringConverter {
    @Override
    public WriteCellData<?> convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
        String s = "";
        if(Objects.equals(value, SysConstant.PRE_ORDER_STATUS)){
            s = "预审中";
        }else if (Objects.equals(value, SysConstant.ING_ORDER_STATUS)){
            s = "评审中";
        }else if (Objects.equals(value, SysConstant.FINISH_ORDER_STATUS)){
            s = "已完成";
        }
        return new WriteCellData<String>(s);
    }
}
